<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="modal-dialog ms-modal-dialog" style="margin-top:50px;" >
  <div class="modal-content">
     
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
      <h4 class="modal-title">修改培训讲师</h4>
    </div>
    
      <form class="form-horizontal ms-form form-personal-info" method="POST" action="${ctx.host}/trainers/${trainer.id}" data-validate="true">
        
        <input type="hidden" name="_method" value="PATCH" />
        
        <input type="hidden" name="trainerId" value="${trainer.id}" />
        
         <div class="modal-body">
             
             <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3"><span class="text-red">*</span>讲师姓名：</label>
	          <div class="col-xs-8">
	            <input type="text" class="form-control" name="name" value="${trainer.name}" placeholder="讲师姓名" data-validate="required" autocomplete="off" tabindex="1"/>
	          </div>
            </div>
            <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">是否认证：</label>
	            <div class="col-xs-8 pull-left">
	              <select class="select2 form-control" name="certified" data-validate="required" >
	                <option value="0" <c:if test="${false==trainer.certified }">selected</c:if>>否</option>
	                <option value="1" <c:if test="${true==trainer.certified }">selected</c:if>>是</option>
	              </select>
	             </div>
            </div>
            <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">认证时间：</label>
	          <div class="col-xs-8">
	            <input type="text" class="form-control" name="certifiedDate"  value="<fmt:formatDate value="${trainer.certifiedDate}" pattern="yyyy-MM-dd"/>" tabindex="3" placeholder="请输入认证时间" autocomplete="off" />
	          </div>
	        </div>
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">讲师类型：</label>
	            <div class="col-xs-8 pull-left">
	              <select class="select2 form-control" name="trainerType"  >
	                <option></option>
	                <c:forEach items="${categories}" var="trainingCategory">
	                  <option <c:if test="${trainer.trainerType eq trainingCategory }">selected</c:if>>${trainingCategory}</option>
	                </c:forEach>
	              </select>
	             </div>
	        </div>
	        <div class="form-group  ms-form-group">
	          <label class="control-label col-xs-3">讲师级别：</label>
	            <div class="col-xs-8 pull-left">
	              <select class="select2 form-control" name="trainerLevel" >
	                <option></option>
	                <option <c:if test="${trainer.trainerLevel == '一级' }">selected</c:if>>一级</option>
	                <option <c:if test="${trainer.trainerLevel == '二级' }">selected</c:if>>二级</option>
	                <option <c:if test="${trainer.trainerLevel == '三级' }">selected</c:if>>三级</option>
	              </select>
	             </div>
	        </div>
        
        </div>
      <div class="modal-footer ms-modal-footer">
        <button type="submit" class="btn btn-shadow-success btn-shadow umu-btn" >确定</button>
        <button type="button" class="btn btn-shadow-default btn-shadow umu-btn" data-dismiss="modal">取消</button>
      </div>

      </form>
    
  </div>
</div>
